/**
 * 应用中间件
 */
const express = require('express');
const app = express();

const bodyParser = require('body-parser');

app.use(express.static('public'));

//挂载参数处理中间件（post）
app.use(bodyParser.urlencoded({extended:false}));

app.post('/login',(req,res)=>{
    let data = req.body;
    console.log(data);
    res.send('ok');
});

app.listen(3000,()=>{
    console.log('running..........');
});